-- GENERATED SPELL FOR [Wastes Taskmaster] --


function spell0_26493(pUnit, Event) --@Destroy Ghoul,n/a--
pUnit:FullCastSpellOnTarget(51202,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26493', 2000, 1)
end

function spell1_26493(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(32712,pUnit)
pUnit:RegisterEvent('Sorts_26493', 575, 1)
end

function spell2_26493(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(16583,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26493', 629, 1)
end

function Sorts_26493(pUnit, Event)
local choix_sorts_26493 = math.random(0, 2)
if choix_sorts_26493 == 0 then
pUnit:RegisterEvent('spell0_26493', 1, 1)
end
if choix_sorts_26493 == 1 then
pUnit:RegisterEvent('spell1_26493', 1, 1)
end
if choix_sorts_26493 == 2 then
pUnit:RegisterEvent('spell2_26493', 1, 1)
end
end

function mob26493_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26493', math.random(1500, 3000), 1)
end

function mob26493_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26493_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26493_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26493, 1, 'mob26493_Action')
RegisterUnitEvent(26493, 2, 'mob26493_Leave')
RegisterUnitEvent(26493, 3, 'mob26493_Kill')
RegisterUnitEvent(26493, 4, 'mob26493_Die')
